#pragma once

#include "base/Control.h"

class GraphNode : public Control
{
public:
    GraphNode() {}
    bool OnInit();
    void ParseXmlElement(class TiXmlElement* ele);
    bool SetAttribute(const char* attrName, const char* attrVal);
    void OnDraw();

    virtual void onMouseButtonDown(int button, int x, int y);
    void onMouseMove(int x, int y);
    void onMouseButtonUp(int button, int x, int y);
    BlueprintScriptLibrary::Class* GetClass();
    Vec2vbi GetOutputPinPos(int index);
    void Execute();
    FunctionPin* GetFunctionPin();
    Vec2vbi baseOffset;;
    VarBaseString graphName;
    FunctionPin* fp;

    bool bMouseDown{false};
    bool bDrag{ false };
    GraphNode* nextGraph;
};
RegisterBlueprintClass(GraphNode)